const baseUrl = "http://127.0.0.1:19999";
let userId = "";

function getUrlParams() {
    const obj = {};
    const search = window.location.search.substring(1);
    const arr1 = search.split("&");
    for (const c of arr1) {
        const arr = c.split("=");
        obj[arr[0]] = arr[1];
    }
    return obj;
}

function getTodayDate() {
    const now = new Date();
    let year = now.getFullYear();
    let month = now.getMonth();
    let date = now.getDate();
    month = month + 1;
    if (month < 10) month = "0" + month;
    if (date < 10) date = "0" + date;
    return year + "-" + month + "-" + date;
}